Tree Control¶
The left pane of the main window displays a tree control (Object explorer) that provides access to the objects that reside on a server.
You can expand nodes in the tree control to view the database objects that reside on a selected server. The tree control expands to display a hierarchical view:
Use the plus sign (+) to the left of a node to expand a segment of the tree control.
Click the minus sign (-) to the left of a node to close that node.
Choose Collapse from the context menu, or press Shift + Left Arrow with the tree control focused, to close a node together with every node beneath it. On a node that is not expanded (a table in a long Tables list, for example) this closes its parent instead, and selects it, so there is no need to scroll back up the tree first.
You can also drag and drop certain objects to the Query Tool which can save time in typing long object names. Text containing the object name will be fully qualified with schema. Double quotes will be added if required. For functions and procedures, the function name along with parameter names will be pasted in the Query Tool.
Access context-sensitive menus by right-clicking on a node of the tree control to perform common tasks. Menus display options that include one or more of the following selections (options appear in alphabetical order):
Option |
Action |
|---|---|
Add named restore point |
Click to create and enter the name of a restore point. |
Backup… |
Click to open the Backup… dialog to backup database objects. |
Backup Globals… |
Click to open the Backup Globals… dialog to backup cluster objects. |
Backup Server… |
Click to open the Backup Server… dialog to backup a server. |
Collapse |
Click to close the selected node and every node beneath it, or its parent if the selected node is not expanded. |
Connect Server… |
Click to open the Connect to Server dialog to establish a connection with a server. |
Copy Connection URL |
Click to copy a connection URL for the currently selected database to the clipboard (see below). |
Create |
Click to access a context menu that provides context-sensitive selections. Your selection opens a Create dialog for creating a new object. |
CREATE Script |
Click to open the Query tool to edit or view the CREATE script. |
Debugging |
Click through to open the Debug tool or to select Set breakpoint to stop or pause a script execution. |
Drop |
Click to drop the currently selected object from the server. |
Drop (Cascade) |
Click to drop the currently selected object and all dependent objects from the server. |
Drop (Force) |
Click to drop the currently selected database with force option. |
Disconnect Database… |
Click to terminate a database connection. |
Disconnect from server |
Click to disconnect from the currently selected server. |
Debugging |
Click to access the Debugger tool. |
Grant Wizard |
Click to access the Grant Wizard tool. |
Maintenance… |
Click to open the Maintenance… dialog to VACUUM, ANALYZE, REINDEX, or CLUSTER. |
Properties… |
Click to review or modify the currently selected object’s properties. |
Refresh… |
Click to refresh the currently selected object. |
Reload Configuration… |
Click to update configuration files without restarting the server. |
Restore… |
Click to access the Restore dialog to restore database files from a backup. |
View Data |
Use the View Data option to access the data stored in a selected table with the Data Output tab of the Query Tool. |
The Copy Connection URL option on a database node copies a
libpq connection URI
of the form postgresql://user@host:port/dbname, built from the server’s
configured Host name/address, Port and Username and the name of the
database, with each part percent-encoded. libpq-based clients such as psql
accept it, as do many drivers and libraries, including dj-database-url for
Django. The password is never included in the URL. The server’s Service, if
set, and its Connection Parameters are added as query parameters (for
example ?sslmode=require&connect_timeout=10), except for:
an SSL mode of prefer, which is libpq’s default;
parameters that hold a secret, such as SSL password or OAuth client secret;
parameters that name a file, such as Password file, Client certificate, Client certificate key or Root certificate (unless it is
system), since the path refers to the machine pgAdmin runs on.
A host, port, user or service connection parameter, which a server imported from a file may have, takes the place of the server’s own value in the URL, as it does when pgAdmin connects.
For a server connected through an SSH tunnel, the URL uses the host and port configured for the server, not the local end of the tunnel that pgAdmin creates, so it works only from a machine that can reach the database server directly or through a tunnel of its own. Likewise, a URL that names a service works only where that service is defined in the client’s own connection service file.
The context-sensitive menus associated with Tables and nested Table nodes provides additional display options (options appear in alphabetical order):
Option |
Action |
|---|---|
Import/Export Data… |
Click open the Import/Export… dialog to import data to or export data from the selected table. |
Reset Statistics |
Click to reset statistics for the selected table. |
Scripts |
Click to open the Query tool to edit or view the selected script from the flyout menu. |
Truncate |
Click to remove all rows from a table. |
Truncate Cascade |
Click to remove all rows from a table and its child tables. |
View First 100 Rows |
Click to access a data grid that displays the first 100 rows of the selected table. |
View Last 100 Rows |
Click to access a data grid that displays the last 100 rows of the selected table. |
View All Rows |
Click to access a a data grid that displays all rows of the selected table. |
View Filtered Rows… |
Click to access the Data Filter popup to apply a filter to a set of data. |